Pills of many shapes, sizes and colors are available as both prescription and non-prescription medications. In the United States, the physical identifiers of solid dosage pharmaceuticals are approved by the Federal Drug Administration. Ideally, no two pills are approved to have exactly the same identifiers. Thus, pills are approved to each have a unique combination of shape, size, color, imprint (i.e., characters or numbers printed on the medication), and/or scoring. Nevertheless, despite the fact that every type of FDA-approved pill is indeed intended to be unique, the differences between pills is sometimes subtle. For example, two pills of the same shape but slightly different colors and/or sizes may easily be confused by a patient. Pills normally differentiated by imprint may not appear to be different at all, for example, if the imprints are not readable because the pills are face-down or the patient has poor vision. Such concerns are exacerbated by the actions of patients who may not be fully coherent or alert.
Patients are not the only individuals who have a need to quickly and easily identify pills. Relatives or caretakers of patients may also have such a need. Their need may stem from their responsibility to provide the correct pills to the patient, or simply from a desire to verify that the patient has taken the correct pills. Hospitals may have a need to quickly identify each of a collection of pills that a person brings from home or that may have been ingested by a child admitted for accidental ingestion of medication. Pharmacies have an interest in ensuring that correct pills are dispensed. Insurance companies may even have an interest in monitoring medication adherence, ensuring that correct pills are dispensed to and taken regularly by the insured. In other words, many parties have an interest in verifying the identity of pills, whether the pills are identified individually or as a collection of various pills.
Pills can be identified using various photographic and image processing methods. For example, a digital image of a pill or collection of pills can be taken, and then image processing methods can be used to determine how many pills are in the image, the location and boundaries of the pills in the image, and to assign pixels in the image to a potential pill for identification. This process of segmentation ideally results in every pixel in the image either being assigned to a pill with well-defined and accurate boundaries or being disregarded as not belonging to any pill. Once pixels are assigned, the accumulated pixels for a given pill can be analyzed to determine the characteristics of the pill (e.g., its size, shape, color and imprint).
Color is an important feature used in object identification, especially in pill identification, where sometimes the color of the pills is one of very few differences between two different pills that have the same size and shape. However, the color of an object can appear different under different lighting conditions. Thus, if the imaged color is not corrected, misidentification of the pill can occur.
Recognizing this challenge, traditional pill identification techniques have sometimes required that ideal lighting conditions be used during the digital imaging process. Ideal lighting conditions can ensure that the imaged color is the actual color of the pills. Unfortunately, finding ideal lighting conditions that yield true color images are generally not convenient for most individuals. Additionally, traditional color correction methods based on color distributions in a scene (such as histogram equalization) generally do not result in good color correction for pill identification.
Therefore, there is a need for a color correction method that can compensate for less than ideal lighting conditions and automatically correct imaged colors in pills prior to pill identification.